﻿<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <SnippetTypes>
        <SnippetType>Expansion</SnippetType>
      </SnippetTypes>
      <Title>ORDGetAlignmentsList</Title>
      <Author>innovoCAD</Author>
      <Description>Code snippet for getting Alignments string name list.</Description>
      <HelpUrl>
      </HelpUrl>
      <Shortcut>ORDGetAlignmentsList</Shortcut>
    </Header>
    <Snippet>
      <References>
        <Reference>
          <Assembly>Bentley.CifNET.GeometryModel.SDK.4.0</Assembly>
        </Reference>
      </References>
      <Imports>
        <Import>
          <Namespace>System.Collections.Generic</Namespace>
        </Import>
        <Import>
          <Namespace>SDK = Bentley.CifNET.GeometryModel.SDK</Namespace>
        </Import>
      </Imports>
      <Code Language="vb" Delimiter="$"><![CDATA[    ''' <summary>Get AnnotationDefinitions string name list.</summary>
    Public ReadOnly Property GetAlignments() As List(Of String)
        Get
            Dim alignmentNames As List(Of String) = New List(Of String)

            'Checking for Active SDK connection and Alignment nullification
            If SDKCon.GetActive() Is Nothing Or SDKCon.GetActive().Alignments Is Nothing Then
                alignmentNames.Add("None")
            Else
                For Each alignment As SDK.Alignment In SDKCon.GetActive().Alignments
                    If Not String.IsNullOrEmpty(alignment.Name) Then
                        alignmentNames.Add(alignment.Name)
                    End If
                Next
            End If
            Return alignmentNames
        End Get
    End Property]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>